package com.controller.setting;



import com.comm.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/duty")
@RestController
@Api(value = "职务管理test",tags = "职务管理接口API")
public class   SysDutyController {

    //职务管理按钮
    @RequestMapping(value = ("/findDutyList"),method = RequestMethod.GET)
    @ApiOperation(value = "查询职务信息接口",notes = "显示职务信息",httpMethod = "get", response = R.class)

    public R findDuty(){

        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功");

        String data = "[{\n" +
                "  \"menuId\":1,\n" +
                "  \"menuName\":\"管理员\"},\n" +
                "{\n" +
                "  \"menuId\":2,\n" +
                "  \"menuName\":\"医生\"},\n" +
                "{\n" +
                "  \"menuId\":3,\n" +
                "  \"menuName\":\"护士\"},\n" +
                "{\n" +
                "  \"menuId\":4,\n" +
                "  \"menuName\":\"挂号员\"}\n" +
                "]";
        r.setMsg("查询成功");
        r.setData(data);
        return  r;
    }

    //查看权限按钮
    @RequestMapping(value = ("/findMenuByRoleID"),method = RequestMethod.GET)
    @ApiOperation(value = "查询权限信息接口",notes = "根据角色id查看所拥有权限",httpMethod = "get", response = R.class)
    @ApiImplicitParam(name = "id",value = "角色id",required = true,dataType = "int",paramType = "query")
    public R findMenuByRoleName(Integer id){

        R r = new R();
        r.setCode(200);
        r.setMsg("查询成功");
        String data = "\"menuName\":[\n" +
                "\"看病就诊\",\n" +
                "\"收费发药\",\n" +
                "\"药品进销存\",\n" +
                "\"数据统计\",\n" +
                "\"数据统计\",\n" +
                "\"系统设置\",\n" +
                "\"新开就诊\"]";
        r.setData(data);
        return  r;
    }


}
